home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 46
/
Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso
/
-serious-
/
programming
/
other
/
tandem
/
teaching
/
71.asm
< prev
next >
Wrap
Assembly Source File
|
1999-09-06
|
1KB
|
43 lines
* 71.asm TLpassword version 0.01 8.6.99
include 'Front.i'
strings: dc.b 0
dc.b 'Cancelled',0 ;1
dc.b 'Error: out of memory',0 ;2
ds.w 0
; TLpassword puts up a little requester to get a password. You can adjust
; its position (with xxp_ReqTop & xxp_ReqLeft) to place itself on a
; window where it's required. This program does not encrypt the input
; internally, so it is a fairly naive sort of routine.
* demonstrate TLPassword
Program:
TLwindow #-1 ;set up
beq Pr_quit ;bad if can't
TLpassword #6 ;get password (6 characters maximum)
beq.s Pr_bad2 ;go report if error
cmp.b #$1B,d0
bne.s Pr_rept ;go report password if ok
TLstrbuf #1
bra.s Pr_rept ;go report if cancel
Pr_bad1: ;error 1: out of mem (report in monitor)
TLbad #2
bra.s Pr_quit
Pr_bad2: ;error 2: TLpassword failed - error to buff
TLerror
Pr_rept: ;report password / cancel / error
TLreqchoose
Pr_quit:
rts